from django.urls import path
from .views import (
    PostListView,
    PostDetailView,
    PostCreateView,
    PostUpdateView,
    PostDeleteView,
    post_comment,
    category_posts,
    tag_posts
)

urlpatterns = [
    path('', PostListView.as_view(), name='home'),
    path('post/<slug:slug>/', PostDetailView.as_view(), name='post_detail'),
    path('post/new/', PostCreateView.as_view(), name='post_create'),
    path('post/<slug:slug>/update/', PostUpdateView.as_view(), name='post_update'),
    path('post/<slug:slug>/delete/', PostDeleteView.as_view(), name='post_delete'),
    path('post/<int:post_pk>/comment/', post_comment, name='post_comment'),
    path('category/<str:category_slug>/', category_posts, name='category'),
    path('tag/<str:tag_slug>/', tag_posts, name='tag'),
]